package com.ecoolex.discount.sales.entity;

import com.ecoolex.framework.common.annotation.Description;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import org.springframework.lang.NonNull;

/**
 *
 *   由我付订单记录表<br>
 *<br>
 * 数据表： you_world_order_record
 *
 */
@Description({"由我付订单记录表"})
public class YouWorldOrderRecord implements Serializable {
    /**
     *
     *   主键    <br>
     *<br>
     * 字段名： you_world_order_record.Id
     */
    @Description({"主键", "不能为空", "数据长度: 19"})
    @NonNull
    private Long id;

    /**
     *
     *   订单号    <br>
     *<br>
     * 字段名： you_world_order_record.OrderNo
     */
    @Description({"订单号", "数据长度: 100"})
    private String orderNo;

    /**
     *
     *   用户Id    <br>
     *<br>
     * 字段名： you_world_order_record.UserId
     */
    @Description({"用户Id", "数据长度: 100"})
    private String userId;

    /**
     *
     *   商品ID    <br>
     *<br>
     * 字段名： you_world_order_record.ProdeuctId
     */
    @Description({"商品ID", "数据长度: 100"})
    private String prodeuctId;

    /**
     *
     *   商品名称    <br>
     *<br>
     * 字段名： you_world_order_record.ProductName
     */
    @Description({"商品名称", "数据长度: 100"})
    private String productName;

    /**
     *
     *   商品价格    <br>
     *<br>
     * 字段名： you_world_order_record.ProductPrice
     */
    @Description({"商品价格", "数据长度: 10"})
    private BigDecimal productPrice;

    /**
     *
     *   支付金额    <br>
     *<br>
     * 字段名： you_world_order_record.Amount
     */
    @Description({"支付金额", "数据长度: 10"})
    private BigDecimal amount;

    /**
     *
     *   平台    <br>
     *<br>
     * 字段名： you_world_order_record.Platform
     */
    @Description({"平台", "数据长度: 100"})
    private String platform;

    /**
     *
     *   支付渠道    <br>
     *<br>
     * 字段名： you_world_order_record.PaymentChannel
     */
    @Description({"支付渠道", "数据长度: 100"})
    private String paymentChannel;

    /**
     *
     *   商户号    <br>
     *<br>
     * 字段名： you_world_order_record.MerchantId
     */
    @Description({"商户号", "数据长度: 100"})
    private String merchantId;

    /**
     *
     *   折扣率    <br>
     *<br>
     * 字段名： you_world_order_record.DiscountPercent
     */
    @Description({"折扣率", "数据长度: 10"})
    private BigDecimal discountPercent;

    /**
     *
     *   会员积分    <br>
     *<br>
     * 字段名： you_world_order_record.MembershipPoints
     */
    @Description({"会员积分", "数据长度: 10"})
    private BigDecimal membershipPoints;

    /**
     *
     *   交易币种    <br>
     *<br>
     * 字段名： you_world_order_record.Currency
     */
    @Description({"交易币种", "数据长度: 100"})
    private String currency;

    /**
     *
     *   汇率    <br>
     *<br>
     * 字段名： you_world_order_record.ExchangeRate
     */
    @Description({"汇率", "数据长度: 100"})
    private String exchangeRate;

    /**
     *
     *   支付状态    <br>
     *<br>
     * 字段名： you_world_order_record.PaymentStatus
     */
    @Description({"支付状态", "数据长度: 100"})
    private String paymentStatus;

    /**
     *
     *   退款状态    <br>
     *<br>
     * 字段名： you_world_order_record.RefundStatus
     */
    @Description({"退款状态", "数据长度: 100"})
    private String refundStatus;

    /**
     *
     *   状态    <br>
     *<br>
     * 字段名： you_world_order_record.Status
     */
    @Description({"状态", "不能为空", "数据长度: 5"})
    @NonNull
    private Integer status;

    public static final Boolean NOT_DELETED = Deleted.NOT_DELETED.value();

    public static final Boolean IS_DELETED = Deleted.IS_DELETED.value();

    /**
     *
     *   逻辑删除    <br>
     *<br>
     * 字段名： you_world_order_record.Deleted
     */
    @Description({"逻辑删除", "不能为空", "数据长度: 1"})
    @NonNull
    private Boolean deleted;

    /**
     *
     *   创建用户    <br>
     *<br>
     * 字段名： you_world_order_record.CreateUser
     */
    @Description({"创建用户", "不能为空", "数据长度: 50"})
    @NonNull
    private String createUser;

    /**
     *
     *   创建时间    <br>
     *<br>
     * 字段名： you_world_order_record.CreateTime
     */
    @Description({"创建时间", "不能为空", "数据长度: 26"})
    @NonNull
    private Date createTime;

    /**
     *
     *   修改用户    <br>
     *<br>
     * 字段名： you_world_order_record.UpdateUser
     */
    @Description({"修改用户", "不能为空", "数据长度: 50"})
    @NonNull
    private String updateUser;

    /**
     *
     *   修改时间    <br>
     *<br>
     * 字段名： you_world_order_record.UpdateTime
     */
    @Description({"修改时间", "不能为空", "数据长度: 26"})
    @NonNull
    private Date updateTime;

    private static final long serialVersionUID = 1L;

    /**
     * 获取参数<br><br>
     *
     *   主键    <br>
     *<br>
     * 字段名： you_world_order_record.Id
     */
    public Long getId() {
        return id;
    }

    /**
     * 设置参数<br><br>
     *
     *   主键<br>
     *<br>
     * 字段名： you_world_order_record.Id
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 获取参数<br><br>
     *
     *   订单号    <br>
     *<br>
     * 字段名： you_world_order_record.OrderNo
     */
    public String getOrderNo() {
        return orderNo;
    }

    /**
     * 设置参数<br><br>
     *
     *   订单号<br>
     *<br>
     * 字段名： you_world_order_record.OrderNo
     */
    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo == null ? null : orderNo.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   用户Id    <br>
     *<br>
     * 字段名： you_world_order_record.UserId
     */
    public String getUserId() {
        return userId;
    }

    /**
     * 设置参数<br><br>
     *
     *   用户Id<br>
     *<br>
     * 字段名： you_world_order_record.UserId
     */
    public void setUserId(String userId) {
        this.userId = userId == null ? null : userId.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   商品ID    <br>
     *<br>
     * 字段名： you_world_order_record.ProdeuctId
     */
    public String getProdeuctId() {
        return prodeuctId;
    }

    /**
     * 设置参数<br><br>
     *
     *   商品ID<br>
     *<br>
     * 字段名： you_world_order_record.ProdeuctId
     */
    public void setProdeuctId(String prodeuctId) {
        this.prodeuctId = prodeuctId == null ? null : prodeuctId.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   商品名称    <br>
     *<br>
     * 字段名： you_world_order_record.ProductName
     */
    public String getProductName() {
        return productName;
    }

    /**
     * 设置参数<br><br>
     *
     *   商品名称<br>
     *<br>
     * 字段名： you_world_order_record.ProductName
     */
    public void setProductName(String productName) {
        this.productName = productName == null ? null : productName.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   商品价格    <br>
     *<br>
     * 字段名： you_world_order_record.ProductPrice
     */
    public BigDecimal getProductPrice() {
        return productPrice;
    }

    /**
     * 设置参数<br><br>
     *
     *   商品价格<br>
     *<br>
     * 字段名： you_world_order_record.ProductPrice
     */
    public void setProductPrice(BigDecimal productPrice) {
        this.productPrice = productPrice;
    }

    /**
     * 获取参数<br><br>
     *
     *   支付金额    <br>
     *<br>
     * 字段名： you_world_order_record.Amount
     */
    public BigDecimal getAmount() {
        return amount;
    }

    /**
     * 设置参数<br><br>
     *
     *   支付金额<br>
     *<br>
     * 字段名： you_world_order_record.Amount
     */
    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    /**
     * 获取参数<br><br>
     *
     *   平台    <br>
     *<br>
     * 字段名： you_world_order_record.Platform
     */
    public String getPlatform() {
        return platform;
    }

    /**
     * 设置参数<br><br>
     *
     *   平台<br>
     *<br>
     * 字段名： you_world_order_record.Platform
     */
    public void setPlatform(String platform) {
        this.platform = platform == null ? null : platform.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   支付渠道    <br>
     *<br>
     * 字段名： you_world_order_record.PaymentChannel
     */
    public String getPaymentChannel() {
        return paymentChannel;
    }

    /**
     * 设置参数<br><br>
     *
     *   支付渠道<br>
     *<br>
     * 字段名： you_world_order_record.PaymentChannel
     */
    public void setPaymentChannel(String paymentChannel) {
        this.paymentChannel = paymentChannel == null ? null : paymentChannel.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   商户号    <br>
     *<br>
     * 字段名： you_world_order_record.MerchantId
     */
    public String getMerchantId() {
        return merchantId;
    }

    /**
     * 设置参数<br><br>
     *
     *   商户号<br>
     *<br>
     * 字段名： you_world_order_record.MerchantId
     */
    public void setMerchantId(String merchantId) {
        this.merchantId = merchantId == null ? null : merchantId.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   折扣率    <br>
     *<br>
     * 字段名： you_world_order_record.DiscountPercent
     */
    public BigDecimal getDiscountPercent() {
        return discountPercent;
    }

    /**
     * 设置参数<br><br>
     *
     *   折扣率<br>
     *<br>
     * 字段名： you_world_order_record.DiscountPercent
     */
    public void setDiscountPercent(BigDecimal discountPercent) {
        this.discountPercent = discountPercent;
    }

    /**
     * 获取参数<br><br>
     *
     *   会员积分    <br>
     *<br>
     * 字段名： you_world_order_record.MembershipPoints
     */
    public BigDecimal getMembershipPoints() {
        return membershipPoints;
    }

    /**
     * 设置参数<br><br>
     *
     *   会员积分<br>
     *<br>
     * 字段名： you_world_order_record.MembershipPoints
     */
    public void setMembershipPoints(BigDecimal membershipPoints) {
        this.membershipPoints = membershipPoints;
    }

    /**
     * 获取参数<br><br>
     *
     *   交易币种    <br>
     *<br>
     * 字段名： you_world_order_record.Currency
     */
    public String getCurrency() {
        return currency;
    }

    /**
     * 设置参数<br><br>
     *
     *   交易币种<br>
     *<br>
     * 字段名： you_world_order_record.Currency
     */
    public void setCurrency(String currency) {
        this.currency = currency == null ? null : currency.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   汇率    <br>
     *<br>
     * 字段名： you_world_order_record.ExchangeRate
     */
    public String getExchangeRate() {
        return exchangeRate;
    }

    /**
     * 设置参数<br><br>
     *
     *   汇率<br>
     *<br>
     * 字段名： you_world_order_record.ExchangeRate
     */
    public void setExchangeRate(String exchangeRate) {
        this.exchangeRate = exchangeRate == null ? null : exchangeRate.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   支付状态    <br>
     *<br>
     * 字段名： you_world_order_record.PaymentStatus
     */
    public String getPaymentStatus() {
        return paymentStatus;
    }

    /**
     * 设置参数<br><br>
     *
     *   支付状态<br>
     *<br>
     * 字段名： you_world_order_record.PaymentStatus
     */
    public void setPaymentStatus(String paymentStatus) {
        this.paymentStatus = paymentStatus == null ? null : paymentStatus.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   退款状态    <br>
     *<br>
     * 字段名： you_world_order_record.RefundStatus
     */
    public String getRefundStatus() {
        return refundStatus;
    }

    /**
     * 设置参数<br><br>
     *
     *   退款状态<br>
     *<br>
     * 字段名： you_world_order_record.RefundStatus
     */
    public void setRefundStatus(String refundStatus) {
        this.refundStatus = refundStatus == null ? null : refundStatus.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   状态    <br>
     *<br>
     * 字段名： you_world_order_record.Status
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * 设置参数<br><br>
     *
     *   状态<br>
     *<br>
     * 字段名： you_world_order_record.Status
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    public void andLogicalDeleted(boolean deleted) {
        setDeleted(deleted ? Deleted.IS_DELETED.value() : Deleted.NOT_DELETED.value());
    }

    /**
     * 获取参数<br><br>
     *
     *   逻辑删除    <br>
     *<br>
     * 字段名： you_world_order_record.Deleted
     */
    public Boolean getDeleted() {
        return deleted;
    }

    /**
     * 设置参数<br><br>
     *
     *   逻辑删除<br>
     *<br>
     * 字段名： you_world_order_record.Deleted
     */
    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }

    /**
     * 获取参数<br><br>
     *
     *   创建用户    <br>
     *<br>
     * 字段名： you_world_order_record.CreateUser
     */
    public String getCreateUser() {
        return createUser;
    }

    /**
     * 设置参数<br><br>
     *
     *   创建用户<br>
     *<br>
     * 字段名： you_world_order_record.CreateUser
     */
    public void setCreateUser(String createUser) {
        this.createUser = createUser == null ? null : createUser.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   创建时间    <br>
     *<br>
     * 字段名： you_world_order_record.CreateTime
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 设置参数<br><br>
     *
     *   创建时间<br>
     *<br>
     * 字段名： you_world_order_record.CreateTime
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 获取参数<br><br>
     *
     *   修改用户    <br>
     *<br>
     * 字段名： you_world_order_record.UpdateUser
     */
    public String getUpdateUser() {
        return updateUser;
    }

    /**
     * 设置参数<br><br>
     *
     *   修改用户<br>
     *<br>
     * 字段名： you_world_order_record.UpdateUser
     */
    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser == null ? null : updateUser.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   修改时间    <br>
     *<br>
     * 字段名： you_world_order_record.UpdateTime
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * 设置参数<br><br>
     *
     *   修改时间<br>
     *<br>
     * 字段名： you_world_order_record.UpdateTime
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public enum Deleted {
        NOT_DELETED(new Boolean("false"), "未删除"),
        IS_DELETED(new Boolean("true"), "已删除");

        private final Boolean value;

        private final String name;

        Deleted(Boolean value, String name) {
            this.value = value;
            this.name = name;
        }

        public Boolean getValue() {
            return this.value;
        }

        public Boolean value() {
            return this.value;
        }

        public String getName() {
            return this.name;
        }
    }

    public enum Column {
        id("Id", "id", "BIGINT", false),
        orderNo("OrderNo", "orderNo", "VARCHAR", false),
        userId("UserId", "userId", "VARCHAR", false),
        prodeuctId("ProdeuctId", "prodeuctId", "VARCHAR", false),
        productName("ProductName", "productName", "VARCHAR", false),
        productPrice("ProductPrice", "productPrice", "DECIMAL", false),
        amount("Amount", "amount", "DECIMAL", false),
        platform("Platform", "platform", "VARCHAR", false),
        paymentChannel("PaymentChannel", "paymentChannel", "VARCHAR", false),
        merchantId("MerchantId", "merchantId", "VARCHAR", false),
        discountPercent("DiscountPercent", "discountPercent", "DECIMAL", false),
        membershipPoints("MembershipPoints", "membershipPoints", "DECIMAL", false),
        currency("Currency", "currency", "VARCHAR", false),
        exchangeRate("ExchangeRate", "exchangeRate", "VARCHAR", false),
        paymentStatus("PaymentStatus", "paymentStatus", "VARCHAR", false),
        refundStatus("RefundStatus", "refundStatus", "VARCHAR", false),
        status("Status", "status", "INTEGER", true),
        deleted("Deleted", "deleted", "BIT", false),
        createUser("CreateUser", "createUser", "VARCHAR", true),
        createTime("CreateTime", "createTime", "TIMESTAMP", false),
        updateUser("UpdateUser", "updateUser", "VARCHAR", false),
        updateTime("UpdateTime", "updateTime", "TIMESTAMP", false);

        private static final String BEGINNING_DELIMITER = "`";

        private static final String ENDING_DELIMITER = "`";

        private final String column;

        private final boolean isColumnNameDelimited;

        private final String javaProperty;

        private final String jdbcType;

        public String value() {
            return this.column;
        }

        public String getValue() {
            return this.column;
        }

        public String getJavaProperty() {
            return this.javaProperty;
        }

        public String getJdbcType() {
            return this.jdbcType;
        }

        Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
            this.column = column;
            this.javaProperty = javaProperty;
            this.jdbcType = jdbcType;
            this.isColumnNameDelimited = isColumnNameDelimited;
        }

        public String desc() {
            return this.getEscapedColumnName() + " DESC";
        }

        public String asc() {
            return this.getEscapedColumnName() + " ASC";
        }

        public static Column[] excludes(Column ... excludes) {
            ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
            if (excludes != null && excludes.length > 0) {
                columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
            }
            return columns.toArray(new Column[]{});
        }

        public String getEscapedColumnName() {
            if (this.isColumnNameDelimited) {
                return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
            } else {
                return this.column;
            }
        }
    }
}